﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Remoting.Messaging;
using MessageCallAspect.Inspector.MessageSink;

namespace MessageCallAspect.UnitTest
{
    public class MockMessageSinkCreator2 : IMessageSinkCreator
    {
        #region IMessageSinkCreator Members

        public int Order
        {
            get;
            set;
        }

        public IMessageSink CreateMessageSink(IServiceProvider context, object target, System.Runtime.Remoting.Messaging.IMessageSink nextSink)
        {
            MessageSink = new MockMessageSink();
            MessageSink.Order = Order;
            MessageSink.NextSink = nextSink;
            return MessageSink;

        }

        #endregion

        #region IDisposable Members

        public void Dispose()
        {

        }

        #endregion

        public MockMessageSink MessageSink
        {
            get;
            private set;
        }
    }
    public class MockMessageSinkCreator : IMessageSinkCreator
    {
        #region IMessageSinkCreator Members

        public int Order
        {
            get;
            set;
        }

        public IMessageSink CreateMessageSink(IServiceProvider context, object target, System.Runtime.Remoting.Messaging.IMessageSink nextSink)
        {
            MessageSink = new MockMessageSink();
            MessageSink.Order = Order;
            MessageSink.NextSink = nextSink;
            return MessageSink;

        }

        #endregion

        #region IDisposable Members

        public void Dispose()
        {

        }

        #endregion

        public MockMessageSink MessageSink
        {
            get;
            private set;
        }
    }
}
